﻿@{
    Layout = null;
}
<script>
    function SearchDB() { //检索按钮
        $('#pageIndexNow').val('1');//每次点击检索将页码初始化为1
        var searchname = $("#DbName").val();
        $("#HiddenDbName").val(searchname);
        SearchData();
    }
    $(document).keydown(function (event) {
        if (event.keyCode == 13) {
            SearchDB();
        }
    });
    //点击分页
    function searchPageNew(n) {
        $('#pageIndexNow').val(n);
        SearchData();
    }
    $(function () {
        SearchData();
    })
    function SearchData() {
        var searchForm = $('#searchForm');
        searchForm.submit();
    }
</script>

<!-- wrapRStart -->
<div class="wrapR-h">
    <div class="form form-h" style="padding-top:20px">
        @using (Ajax.BeginForm("SearchSmilar", new { }, new AjaxOptions()
                {
                    HttpMethod = "post",
                    InsertionMode = InsertionMode.Replace,
                    UpdateTargetId = "docListSmilar",
                    LoadingElementId = "loadingdoc"
                }, new { id = "searchForm" }))
        { 
            <fieldset>
                <input type="hidden" id="pageIndexNow" name="pageIndexNow" value="1" />
                <div class="f-gp">
                    <div class="f-lb">
                        <label class="f-label" style="text-decoration:none;cursor:default;">数据库名称：</label>
                    </div>
                    <div class="f-ct f-ml">
                        <span class="f-input-ap block">
                            <input type="text" class="f-text span4" name="DbName" id="DbName" maxlength="255">
                             <input type="hidden" class="f-text span4" name="HiddenDbName"  id="HiddenDbName">
                            <a class="btn btn-submit btn-warn-f" href="javascript:void(0);" onclick="SearchDB()">检索</a>
                        </span>
                    </div>
                </div>
            </fieldset>
        }
    </div>

</div>
<div id="loadingdoc" style="display: none; margin-left: 346px; margin-top: 108px; position: absolute">
    <img src="~/Images/loading.gif" width="50" />
</div>
<div id="docListSmilar">
</div>

<!-- wrapREnd -->
